﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SkynetMaster.Master"
 Inherits="System.Web.Mvc.ViewPage<IEnumerable<dynamic>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	List
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table width="100%">
            <tr>
                <td>
                    &nbsp;</td>
                <td>           
                    <h1>List of Exams</h1>

                    </td>
                <td>          
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td>           
                    &nbsp;</td>
                <td>          
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    Category</td>
                <td>                
                <% using (Ajax.BeginForm("List", new AjaxOptions { UpdateTargetId = "ExamGridView", HttpMethod = "POST", LoadingElementId = "WaitPanel" }))
                { %>
                    <%= Html.DropDownList("CategoryId", new SelectList((IEnumerable)ViewData["Categories"], "Id", "Title", string.Empty), new { onchange = "this.form.onsubmit()" })%>                                          
                <% } %>
                    
                    
               </td>
                <td>          
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    Exams</td>
                <td>           
                </td>
                <td>          
                    &nbsp;</td>
            </tr>
            <tr>
                <td colspan="2">
                    
                    
                    <div id="ExamGridView"></div>

                </td>
                <td>          
                    &nbsp;</td>
            </tr>
 
 
            <tr>
                <td >
                    &nbsp;</td>
                <td >
           
                </td>
                <td >
           
                    &nbsp;</td>
            </tr>
            <tr>
                <td colspan="2">          


                    </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                     &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td>            
                </td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>    

    <div id="WaitPanel" style="display:none;">
        <img alt="loading" src='<%= Url.Content("~/Images/ajax-loader.gif")%>' />        
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {
            $('#CategoryId').trigger('change');
         });
    </script>
    
</asp:Content>
